<template>
    <div class="shopRecomd">
        <div class="top">
            <h1>店铺推荐</h1>
            <span>更多品质好店</span>
            <i class="iconfont">&#xe634;</i>
        </div>
        <div class="shopRecomd-container swiper-container">
            <div class="swiper-wrapper">
                <div class="swiper-slide" v-for="item in data" :key="item.shop_id">
                    <img :src="item.street_thumb" alt="">
                    <div class="info">
                        <span class="logo">
                            <img :src="item.logo_thumb" alt="">
                        </span>
                        <span class="title">{{ item.rz_shop_name }}</span>
                        <span class="total">共计{{ item.total }}件商品</span>
                    </div>
                </div>
            </div>
        </div>
        <div class="bottom">
            <img src="https://x.dscmall.cn/storage/data/gallery_album/177/original_img/177_P_1597978468372.png" alt="">
            <img src="https://x.dscmall.cn/storage/data/gallery_album/177/original_img/177_P_1597978469174.png" alt="">
        </div>
    </div>
</template>

<script>

import Swiper from 'swiper'

export default {
    props: ["data"],
    data() {
        return {
            swiper: null,
        }
    },
    mounted() {
        new Swiper('.shopRecomd-container', {
            slidesPerView: 'auto',
            spaceBetween: 10,
            freeMode: true,
            freeModeSticky: true,
        })
    },

}
</script>

<style scoped>
.shopRecomd {
    width: 94.6667vw;
    background-color: #fff;
    margin: 2.6667vw auto;
    padding: 0 2.6667vw 2.6667vw;
    box-sizing: border-box;
    border-radius: 2.6667vw;
    overflow: hidden;
}

.top {
    display: flex;
    width: 100%;
    height: 13.3333vw;
    line-height: 13.3333vw;
    gap: 2.6667vw;
    box-sizing: border-box;
    border-bottom: 1px solid #f0f0f0;

    h1 {
        font-size: 5.3333vw;
        font-weight: bold;
    }

    span {
        font-size: 3.7333vw;
        color: #aaa;
    }

    i.iconfont {
        color: red;
        font-size: 5.3333vw;
    }
}


.shopRecomd-container {
    display: flex;
    width: 100%;
    flex-direction: column;
    padding-bottom: 2.6667vw;
}

.shopRecomd-container .swiper-slide {
    width: 28vw;
    background-color: #f6f6f6;
    border-radius: 2.6667vw;
    overflow: hidden;
}

.shopRecomd-container img {
    width: 28vw;
    height: 22.6667vw;
}

.shopRecomd-container span {
    font-size: 3.2vw;
    display: block;
}

.shopRecomd-container .title {
    width: 26.6667vw;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
    line-height: 6.4vw;
    font-size: 3.7333vw;
}
.shopRecomd-container .info{
    position: relative  ;
    padding: 4vw 0;
    .total{
        line-height: 5.3333vw;
    }
}

.shopRecomd-container .logo {
    width: 9.3333vw;
    height: 9.3333vw;
    position: absolute;
    top: -5.8667vw;
    left: 9.3333vw;
    img {
        width: 100%;
        height: 100%;
    border-radius: 50%;
    }
}

.bottom{
    width: 100%;
    display: flex;
    justify-content: space-between;
    img{
        width: 43.2vw;
        height: 24.5333vw;
    }
}
</style>